home *** CD-ROM | disk | FTP | other *** search
- Subject: v12i072: MUSBUS 5.2 Upgrade, Part01/03
- Newsgroups: comp.sources.unix
- Approved: kre@munnari.oz.au
-
- Submitted by: kenj@moncsbruce.oz (Ken McDonell)
- Posting-number: Volume 12, Issue 72
- Archive-name: musbus5.2/Part01
-
- [ nb: this upgrade uses "normal" diff files, in order to
- save space. It will work, when applied to an unaltered
- musbus from the sources archives (with the exception of
- two files, as noted in the README file included here).
-
- This is intended to be unpacked in a directory "Update",
- a new subdirectory of the root of the musbus tree. Whether
- you do that, or move the files later, doesn't matter. ... kre]
-
- MUSBUS - Monash University Software for Benchmarking Unix Systems
-
- This distribution contains all the files and scripts necessary to upgrade
- the MUSBUS suite from version 5.0 (as originally distributed to Usenet
- comp.sources.unix as volume 11, issues 29 to 32) to version 5.2.
-
- The upgrade kit assumes you have the public domain program ``patch''
- for applying ``diff'' patches to files, and all changes may be applied
- automatically using the supplied script ``install''. See the README
- for further details.
-
- #! /bin/sh
- # This is a shell archive, meaning:
- # 1. Remove everything above the #! /bin/sh line.
- # 2. Save the resulting text in a file.
- # 3. Execute the file with /bin/sh (not csh) to create the files:
- # README
- # changes
- # chkpath
- # install
- # update.001
- # update.002
- # update.003
- # update.004
- # update.005
- # update.006
- # update.007
- # update.008
- # update.009
- # update.010
- # update.011
- # update.012
- # update.013
- # update.014
- # update.015
- # update.016
- # update.017
- # update.018
- # update.019
- # update.020
- # This archive created: Tue Jan 19 08:35:29 EST 1988
- export PATH; PATH=/bin:$PATH
- echo 'x - README'
- if test -f 'README'
- then
- echo 'shar: over-writing existing file README'
- fi
- sed 's/^X//' > README <<'End-of-File-Grunt'
- XMUSBUS - Monash University Software for Benchmarking Unix Systems
- X
- XMUSBUS Version 5.2 -- Installation Notes
- X
- XThis directory contains all the files and scripts necessary to upgrade
- Xthe Monash University Software for Benchmarking Unix Systems (MUSBUS)
- Xsuite from version 5.0 (as originally distributed to Usenet comp.sources.unix
- Xas volume 11, issues 29 to 32) to the most recent version 5.2.
- X
- XThe most common application of MUSBUS is as a performance evaluation
- Xtool to predict system throughput in a simulated multi-user test using
- Xsite- or application-specific workload scripts to model the profile
- Xof user processing activity.
- X
- XMajor changes between versions 5.0 and 5.2
- X
- X[*] System V specific fixes applied.
- X
- X[*] New workload profiles (text processing and system exercising under
- X heavy load), and assistance for automating the creation and integration
- X of tailor-made workload profiles into the multi-user test.
- X
- X[*] Tighter error checking.
- X
- X[*] Many minor bug fixes and enhancements to improve portability and
- X robustness.
- X
- XThe file ``changes'' in this upgrade kit describes *state* changes to
- Xfiles that will be made during the upgrade.
- X
- XThe upgrade kit assumes you have the public domain program ``patch''
- Xfor applying ``diff'' patches to files.
- X
- XTo make the upgrade,
- X
- X1) cd to the MUSBUS version 5.0 source directory
- X
- X2) ./mkinstall
- X If you have been running the version 5.0 software, this will do nothing.
- X If the source is unpacked directly from the original Usenet
- X comp.sources.unix shar files, this will create the necessary directory
- X structure and shuffle some files into the correct places.
- X
- X3) mkdir Update
- X
- X4) move or copy all the files from the upgrade kit to the directory Update;
- X ensure they are unpacked from their shar archive format (should be 52
- X files).
- X
- X5) cd Update
- X
- X6) chmod u+x install
- X ./install
- X This will make the upgrade, and leave copies of the previous version
- X of any altered file in the directory tree at or below `.' with a
- X filename suffix of ``.orig''
- X There is a chance that patch will complain about some unexpected
- X text in your 5.0 versions -- these cases should all be constrained
- X to problems with the CTL-G (BELL) characters being stripped from the
- X Usenet distributions in the files ``run'' and ``cleanup''; this
- X requires the obvious (but manual) changes involving $bell or ${bell}
- X (in the new versions) -- check also that $bell is assigned to "^G",
- X not "", at the start of each of these files.
- X
- X7) cd ..
- X
- X8) Check the Makefile rule for making time.awk is
- X ln BDStime.awk time.awk
- X or
- X ln SysVtime.awk time.awk
- X depending on your flavour of Unix.
- X Also check for local changes to the Makefiles, e.g. CFLAGS=-DSysV for
- X System V based systems.
- X
- X9) rm time.awk
- X
- X10) make modes time.awk
- X
- X11) see ``Intro.nr'' for updated user guide and instructions.
- X
- XMail problems to musbus@moncsbruce.oz.au
- End-of-File-Grunt
- if test 2894 -ne `cat 'README' | wc -c`
- then
- echo 'shar: transmission error (expected 2894 characters)'
- fi
- echo 'x - changes'
- if test -f 'changes'
- then
- echo 'shar: over-writing existing file changes'
- fi
- sed 's/^X//' > changes <<'End-of-File-Grunt'
- X./run - patch
- X./time.awk - no RCS archive
- X./arith.c - no change
- X./mem.c - patch
- X./fstime.c - patch
- X./syscall.c - no change
- X./context1.c - no change
- X./pipe.c - patch
- X./spawn.c - no change
- X./big.c - no change
- X./execl.c - no change
- X./makework.c - patch
- X./util.c - patch
- X./getwork.c - patch
- X./keyb.c - patch
- X./iamalive.c - no change
- X./limit.c - no change
- X./clock.c - patch
- X./precision.c - no change
- X./ttychk.c - patch
- X./mkperm.c - no change
- X./makework.h - no change
- X./cctest.c - no change
- X./hanoi.c - no change
- X./MAKE - new
- X./mkdistrib - replacement text
- X./mkinstall - patch
- X./mkscript - patch
- X./mkscript.out - new
- X./fixPATH - new
- X./qhisto - new
- X./Groan - replacement text
- X./progress - new
- X./BSDtime.awk - no change
- X./SysVtime.awk - patch
- X./check.sed - patch
- X./dc.dat - no change
- X./fs.awk - patch
- X./mem.awk - patch
- X./README - no change
- X./Makefile - patch
- X./Intro.nr - patch
- X./cleanup - patch
- X./musbus.1 - no change
- X./signature - new
- X./Workload/Makefile - replacement text
- X./Workload/cat.dat - no change
- X./Workload/dummy.c - no change
- X./Workload/edit.dat - no change
- X./Workload/grep.dat - no change
- X./Workload/edscr1.dat - no change
- X./Workload/edscr2.dat - no change
- X./Workload/DESCRIPTION - new
- X./Workload/script.master - replacement text
- X./Workload/cleanstderr - new
- X./Work_text/Makefile - new
- X./Work_text/big.txt - new
- X./Work_text/viscr1.dat - new
- X./Work_text/viscr2.dat - new
- X./Work_text/small.txt - new
- X./Work_text/DESCRIPTION - new
- X./Work_text/map_pty - new
- X./Work_text/termname.c - new
- X./Work_text/README - new
- X./Work_text/cleanstderr - new
- X./Work_text/script.master - new
- X./Work_stress/Makefile - new
- X./Work_stress/cleanstderr - new
- X./Work_stress/script.master - new
- X./Work_stress/DESCRIPTION - new
- X./Work_stress/README - new
- X./Tools/Makefile - new
- X./Tools/comptbl.1 - no change
- X./Tools/comptbl.2 - no change
- X./Tools/comptbl.3 - no change
- X./Tools/comptbl.4 - no change
- X./Tools/comptbl.5 - no change
- X./Tools/tbl.1 - no change
- X./Tools/tbl.2 - no change
- X./Tools/tbl.3 - no change
- X./Tools/tbl.4 - no change
- X./Tools/tbl.5 - no change
- X./Tools/Adjust - no change
- X./Tools/Config - no change
- X./Tools/mk1 - no change
- X./Tools/mk2 - no change
- X./Tools/mkcomp - no change
- X./Tools/mktbl - no change
- End-of-File-Grunt
- if test 2187 -ne `cat 'changes' | wc -c`
- then
- echo 'shar: transmission error (expected 2204 characters)'
- fi
- echo 'x - chkpath'
- if test -f 'chkpath'
- then
- echo 'shar: over-writing existing file chkpath'
- fi
- sed 's/^X//' > chkpath <<'End-of-File-Grunt'
- X#! /bin/sh
- Xfor file
- Xdo
- X path=""
- X for dir in `echo $file | sed -e 's,/, ,g' -e 's/^/ /' -e 's/ [^ ]*$//'`
- X do
- X if test "$path" = ""
- X then
- X path=$dir
- X else
- X path=$path/$dir
- X fi
- X test "$path" = "" && continue
- X test -d $path || mkdir $path
- X done
- Xdone
- End-of-File-Grunt
- if test 267 -ne `cat 'chkpath' | wc -c`
- then
- echo 'shar: transmission error (expected 267 characters)'
- fi
- echo 'x - install'
- if test -f 'install'
- then
- echo 'shar: over-writing existing file install'
- fi
- sed 's/^X//' > install <<'End-of-File-Grunt'
- X#! /bin/sh
- X# Update kit for changes to /mnt/kenj/Src/musbus since version Rel5_0
- X# Packaged by mkupdate (version 2.4) on Tue Jan 19 08:09:12 EST 1988
- Xchmod u+x ./chkpath
- Xecho ../run:
- Xpatch ../run <update.001
- X./chkpath ./run
- Xmv ../run.orig ./run.orig
- Xecho ../mem.c:
- Xpatch ../mem.c <update.002
- X./chkpath ./mem.c
- Xmv ../mem.c.orig ./mem.c.orig
- Xecho ../fstime.c:
- Xpatch ../fstime.c <update.003
- X./chkpath ./fstime.c
- Xmv ../fstime.c.orig ./fstime.c.orig
- Xecho ../pipe.c:
- Xpatch ../pipe.c <update.004
- X./chkpath ./pipe.c
- Xmv ../pipe.c.orig ./pipe.c.orig
- Xecho ../makework.c:
- Xpatch ../makework.c <update.005
- X./chkpath ./makework.c
- Xmv ../makework.c.orig ./makework.c.orig
- Xecho ../util.c:
- Xpatch ../util.c <update.006
- X./chkpath ./util.c
- Xmv ../util.c.orig ./util.c.orig
- Xecho ../getwork.c:
- Xpatch ../getwork.c <update.007
- X./chkpath ./getwork.c
- Xmv ../getwork.c.orig ./getwork.c.orig
- Xecho ../keyb.c:
- Xpatch ../keyb.c <update.008
- X./chkpath ./keyb.c
- Xmv ../keyb.c.orig ./keyb.c.orig
- Xecho ../clock.c:
- Xpatch ../clock.c <update.009
- X./chkpath ./clock.c
- Xmv ../clock.c.orig ./clock.c.orig
- Xecho ../ttychk.c:
- Xpatch ../ttychk.c <update.010
- X./chkpath ./ttychk.c
- Xmv ../ttychk.c.orig ./ttychk.c.orig
- Xecho ../MAKE:
- X./chkpath ../MAKE
- Xcp update.011 ../MAKE
- Xecho ../mkdistrib:
- X./chkpath ./mkdistrib ../mkdistrib
- Xcp ../mkdistrib ./mkdistrib.orig
- Xchmod u+w ../mkdistrib
- Xcp update.012 ../mkdistrib
- Xchmod u-w ../mkdistrib
- Xecho ../mkinstall:
- Xpatch ../mkinstall <update.013
- X./chkpath ./mkinstall
- Xmv ../mkinstall.orig ./mkinstall.orig
- Xecho ../mkscript:
- Xpatch ../mkscript <update.014
- X./chkpath ./mkscript
- Xmv ../mkscript.orig ./mkscript.orig
- Xecho ../mkscript.out:
- X./chkpath ../mkscript.out
- Xcp update.015 ../mkscript.out
- Xecho ../fixPATH:
- X./chkpath ../fixPATH
- Xcp update.016 ../fixPATH
- Xecho ../qhisto:
- X./chkpath ../qhisto
- Xcp update.017 ../qhisto
- Xecho ../Groan:
- X./chkpath ./Groan ../Groan
- Xcp ../Groan ./Groan.orig
- Xchmod u+w ../Groan
- Xcp update.018 ../Groan
- Xchmod u-w ../Groan
- Xecho ../progress:
- X./chkpath ../progress
- Xcp update.019 ../progress
- Xecho ../SysVtime.awk:
- Xpatch ../SysVtime.awk <update.020
- X./chkpath ./SysVtime.awk
- Xmv ../SysVtime.awk.orig ./SysVtime.awk.orig
- Xecho ../check.sed:
- Xpatch ../check.sed <update.021
- X./chkpath ./check.sed
- Xmv ../check.sed.orig ./check.sed.orig
- Xecho ../fs.awk:
- Xpatch ../fs.awk <update.022
- X./chkpath ./fs.awk
- Xmv ../fs.awk.orig ./fs.awk.orig
- Xecho ../mem.awk:
- Xpatch ../mem.awk <update.023
- X./chkpath ./mem.awk
- Xmv ../mem.awk.orig ./mem.awk.orig
- Xecho ../Makefile:
- Xpatch ../Makefile <update.024
- X./chkpath ./Makefile
- Xmv ../Makefile.orig ./Makefile.orig
- Xecho ../Intro.nr:
- Xpatch ../Intro.nr <update.025
- X./chkpath ./Intro.nr
- Xmv ../Intro.nr.orig ./Intro.nr.orig
- Xecho ../cleanup:
- Xpatch ../cleanup <update.026
- X./chkpath ./cleanup
- Xmv ../cleanup.orig ./cleanup.orig
- Xecho ../signature:
- X./chkpath ../signature
- Xcp update.027 ../signature
- Xecho ../Workload/Makefile:
- X./chkpath ./Workload/Makefile ../Workload/Makefile
- Xcp ../Workload/Makefile ./Workload/Makefile.orig
- Xchmod u+w ../Workload/Makefile
- Xcp update.028 ../Workload/Makefile
- Xchmod u-w ../Workload/Makefile
- Xecho ../Workload/DESCRIPTION:
- X./chkpath ../Workload/DESCRIPTION
- Xcp update.029 ../Workload/DESCRIPTION
- Xecho ../Workload/script.master:
- X./chkpath ./Workload/script.master ../Workload/script.master
- Xcp ../Workload/script.master ./Workload/script.master.orig
- Xchmod u+w ../Workload/script.master
- Xcp update.030 ../Workload/script.master
- Xchmod u-w ../Workload/script.master
- Xecho ../Workload/cleanstderr:
- X./chkpath ../Workload/cleanstderr
- Xcp update.031 ../Workload/cleanstderr
- Xecho ../Work_text/Makefile:
- X./chkpath ../Work_text/Makefile
- Xcp update.032 ../Work_text/Makefile
- Xecho ../Work_text/big.txt:
- X./chkpath ../Work_text/big.txt
- Xcp update.033 ../Work_text/big.txt
- Xecho ../Work_text/viscr1.dat:
- X./chkpath ../Work_text/viscr1.dat
- Xcp update.034 ../Work_text/viscr1.dat
- Xecho ../Work_text/viscr2.dat:
- X./chkpath ../Work_text/viscr2.dat
- Xcp update.035 ../Work_text/viscr2.dat
- Xecho ../Work_text/small.txt:
- X./chkpath ../Work_text/small.txt
- Xcp update.036 ../Work_text/small.txt
- Xecho ../Work_text/DESCRIPTION:
- X./chkpath ../Work_text/DESCRIPTION
- Xcp update.037 ../Work_text/DESCRIPTION
- Xecho ../Work_text/map_pty:
- X./chkpath ../Work_text/map_pty
- Xcp update.038 ../Work_text/map_pty
- Xecho ../Work_text/termname.c:
- X./chkpath ../Work_text/termname.c
- Xcp update.039 ../Work_text/termname.c
- Xecho ../Work_text/README:
- X./chkpath ../Work_text/README
- Xcp update.040 ../Work_text/README
- Xecho ../Work_text/cleanstderr:
- X./chkpath ../Work_text/cleanstderr
- Xcp update.041 ../Work_text/cleanstderr
- Xecho ../Work_text/script.master:
- X./chkpath ../Work_text/script.master
- Xcp update.042 ../Work_text/script.master
- Xecho ../Work_stress/Makefile:
- X./chkpath ../Work_stress/Makefile
- Xcp update.043 ../Work_stress/Makefile
- Xecho ../Work_stress/cleanstderr:
- X./chkpath ../Work_stress/cleanstderr
- Xcp update.044 ../Work_stress/cleanstderr
- Xecho ../Work_stress/script.master:
- X./chkpath ../Work_stress/script.master
- Xcp update.045 ../Work_stress/script.master
- Xecho ../Work_stress/DESCRIPTION:
- X./chkpath ../Work_stress/DESCRIPTION
- Xcp update.046 ../Work_stress/DESCRIPTION
- Xecho ../Work_stress/README:
- X./chkpath ../Work_stress/README
- Xcp update.047 ../Work_stress/README
- Xecho ../Tools/Makefile:
- X./chkpath ../Tools/Makefile
- Xcp update.048 ../Tools/Makefile
- End-of-File-Grunt
- if test 5204 -ne `cat 'install' | wc -c`
- then
- echo 'shar: transmission error (expected 5204 characters)'
- fi
- echo 'x - update.001'
- if test -f 'update.001'
- then
- echo 'shar: over-writing existing file update.001'
- fi
- sed 's/^X//' > update.001 <<'End-of-File-Grunt'
- X2c2
- X< version="5.0"
- X---
- X> version="5.2"
- X8c8
- X< # $Header: run,v 3.13 87/09/17 06:09:50 kenj Exp $
- X---
- X> # $Header: run,v 5.2 88/01/12 06:23:43 kenj Exp $
- X13c13
- X< # kill ls make mkdir rm sed test time touch tty who
- X---
- X> # kill ls make mkdir rm sed test time touch tty umask who
- X17,39c17,40
- X< # Test Variable Default Use
- X< # all iterations 6 repeat count for timing
- X< # arithmetic arithloop 1000 no. of summations
- X< # hanoi ndisk 17 list of nos. of disks
- X< # syscall ncall 4000 no. iterations, each of
- X< # 5 system calls
- X< # context1 switch1 500 no. of switches
- X< # pipe io 2048 no. 512 byte blocks to
- X< # read and write
- X< # spawn children 100 no. of child processes
- X< # execl nexecs 100 no. of execs
- X< # randmem,seqmem arrays 8 64 512 list or array sizes
- X< # poke 100000 no. array accesses
- X< # fstime blocks 62 125 250 500 list of file sizes
- X< # where . directory for files
- X< # need 2 x max[ $blocks ]
- X< # work nusers 1 4 8 16 24 32 list of nos. of users
- X< # rate 2 per user input rate
- X< # [ chars / sec ]
- X< # ttys /dev/tty list of devices where
- X< # output goes
- X< # dirs . list of directories for
- X< # creation of temp work
- X---
- X> # Test Variable Default Use
- X> # all iterations 6 repeat count for timing
- X> # arithmetic arithloop 1000 no. of summations
- X> # hanoi ndisk 17 list of nos. of disks
- X> # syscall ncall 4000 no. iterations, each of
- X> # 5 system calls
- X> # context1 switch1 500 no. of switches
- X> # pipe io 2048 no. 512 byte blocks to read
- X> # and write
- X> # spawn children 100 no. of child processes
- X> # execl nexecs 100 no. of execs
- X> # randmem,seqmem
- X> # arrays 8 64 512 list or array sizes
- X> # poke 100000 no. array accesses
- X> # fstime blocks 62 125 250 500 list of file sizes
- X> # where . directory for files
- X> # need 2 x max[ $blocks ]
- X> # work nusers 1 4 8 16 24 32 list of nos. of users
- X> # rate 2 per user input rate
- X> # [ chars / sec ]
- X> # ttys /dev/tty list of devices for tty output
- X> # dirs . list of directories for
- X> # creation of temp work
- X> # workdir Workload workload description dir
- X41c42,45
- X< if make source install
- X---
- X> umask 022 # at least mortals can read root's files this way
- X> bell=""
- X> workdir=${workdir-Workload} ; export workdir
- X> if make source install WORKDIR=$workdir
- X49,57c53,81
- X< if test $# -eq 0
- X< then
- X< set - arithoh register short int long float double dc hanoi \
- X< syscall pipe context1 spawn execl \
- X< C seqmem randmem fstime work
- X< elif test "$1" = "arithmetic"
- X< then
- X< set - arithoh register short int long float double dc
- X< fi
- X---
- X>
- X> arithmetic="arithoh register short int long float double dc"
- X> system="syscall pipe context1 spawn execl fstime"
- X> misc="C seqmem randmem"
- X> args=""
- X> for word
- X> do
- X> case $word
- X> in
- X> all)
- X> ;;
- X> arithmetic)
- X> args="$args $arithmetic"
- X> ;;
- X> system)
- X> args="$args $system"
- X> ;;
- X> speed)
- X> args="$args $arithmetic $system"
- X> ;;
- X> *)
- X> args="$args $word"
- X> ;;
- X> esac
- X>
- X> done
- X> set - $args
- X> test $# -eq 0 && set - $arithmetic $system $misc work
- X>
- X190d213
- X< scripts=`echo Tmp/script.?`
- X205c228,229
- X< if make script ttychk clock >/dev/null 2>$tmp
- X---
- X> rm -f Tmp/script.1
- X> if make scripts ttychk clock WORKDIR=$workdir 2>$tmp 1>&2
- X214c238,239
- X< cmdline=`sed 1q Workload/script.master | sed 's/%W%[ ]*//'`
- X---
- X> scripts=`echo Tmp/script.?`
- X> cmdline=`sed 1q $workdir/script.master | sed 's/%W%[ ]*//'`
- X229d253
- X< nscript=`echo Tmp/script.? | wc -w`
- X231c255
- X< if ./ttychk $maxusers $orate $nscript $ttys 2>$tmp
- X---
- X> if ./ttychk $maxusers $orate $ttys 2>$tmp
- X244,245c268,269
- X< cd Workload
- X< if make context >/dev/null 2>../$tmp
- X---
- X> cd $workdir
- X> if make context WORKDIR=$workdir 2>../$tmp 1>&2
- X246a271,272
- X> :
- X> else
- X247a274,284
- X> cat $tmp
- X> cat $tmp >>$log
- X> rm -f $tmp
- X> ./cleanup -l $log -r "\"make context\" failed in $workdir" -a
- X> exit 1
- X> fi
- X> if make manifest WORKDIR=$workdir 2>../$tmp 1>&2
- X> then
- X> cd ..
- X> manifest=`cat $tmp`
- X> cplist=`cat $tmp | sed -e 's,^,$workdir/,' -e 's, , $workdir/,g'`
- X253c290
- X< ./cleanup -l $log -r "\"make context\" failed in Workload" -a
- X---
- X> ./cleanup -l $log -r "\"make manifest\" failed in $workdir" -a
- X255a293
- X> user=0
- X257a296
- X> ./iamalive $user
- X260c299,300
- X< cp Workload/* $dir
- X---
- X> eval cp $cplist $dir
- X> user=`expr $user + 1`
- X263a304
- X> echo "Current directory: " `pwd` >>$log
- X275c316,317
- X< echo "This test generates lots of tty output"
- X---
- X> ./signature >>$log
- X> echo "${bell}${bell}This test generates lots of tty output"
- X284c326
- X< if make $need >/dev/null 2>$tmp
- X---
- X> if make $file WORKDIR=$workdir 2>$tmp 1>&2
- X291c333
- X< ./cleanup -l $log -r "\"make $need\" failed!" -a
- X---
- X> ./cleanup -l $log -r "\"make $file\" failed!" -a
- X330c372
- X< test $prog = makework && ./cleanup -w
- X---
- X> test $prog = ./makework && ./cleanup -w
- X346c388,391
- X< ( cd Workload ; ls ) >/tmp/work$$
- X---
- X> echo USER $manifest \
- X> | sed 's/ */\
- X> /g' \
- X> | sort >/tmp/work$$
- X352a398
- X> echo "" >>$logwork
- X354c400
- X< echo " " `cat /tmp/x$$` >>$logwork
- X---
- X> pr -t -l1 -w80 -5 /tmp/x$$ >>$logwork
- X358a405
- X> echo "" >>$logwork
- X360c407
- X< echo " " `cat /tmp/x$$` >>$logwork
- X---
- X> pr -t -l1 -w80 -5 /tmp/x$$ >>$logwork
- End-of-File-Grunt
- if test 5528 -ne `cat 'update.001' | wc -c`
- then
- echo 'shar: transmission error (expected 5528 characters)'
- fi
- echo 'x - update.002'
- if test -f 'update.002'
- then
- echo 'shar: over-writing existing file update.002'
- fi
- sed 's/^X//' > update.002 <<'End-of-File-Grunt'
- X15c15
- X< * #ifdef SysV System V, times() returns real time
- X---
- X> * #ifdef SysV System V, times() returns real time in (1/HZ)th of sec
- X17c17
- X< * $Header: mem.c,v 3.5 87/08/06 08:11:10 kenj Exp $
- X---
- X> * $Header: mem.c,v 5.2 88/01/12 06:06:44 kenj Exp $
- X28a29,33
- X> #ifdef SysV
- X> #include <sys/param.h>
- X> long times();
- X> #endif
- X>
- X35,42c40,47
- X< int *tab;
- X< register char *p;
- X< register int i;
- X< register int j;
- X< register int mask;
- X< register int k;
- X< long iter = 100000;
- X< int size = 8*1024 / sizeof(int);
- X---
- X> int *tab;
- X> register char *p;
- X> register long i;
- X> register long j;
- X> register long mask;
- X> register int k;
- X> long iter = 100000L;
- X> long size = 8*1024 / sizeof(int);
- X45a51
- X> long atol();
- X65c71
- X< size = atoi(&argv[1][2])*1024 / sizeof(int);
- X---
- X> size = atol(&argv[1][2])*1024 / sizeof(int);
- X68c74
- X< iter = atoi(&argv[1][2]);
- X---
- X> iter = atol(&argv[1][2]);
- X77c83
- X< mask = size / sizeof(int);
- X---
- X> mask = size;
- X80c86
- X< printf("%s: malloc failed for %d bytes\n", prog, size*sizeof(int));
- X---
- X> printf("%s: malloc failed for %ld bytes\n", prog, size*sizeof(int));
- X120c126
- X< for (i = 0, k = 0; i < iter; i++) {
- X---
- X> for (i = 0, k = 0; i < iter; i++, k++) {
- X122,123d127
- X< j = index[k];
- X< k++;
- X124a129
- X> j = index[k];
- X126c131,132
- X< j = i % mask;
- X---
- X> if (k >= mask) k = 0;
- X> j = k;
- X130a137
- X> ohead[0] = ohead[0]*1000/HZ; /* convert to millisec */
- X157a165
- X> srand(j); /* use value from loop to fool clever optimizers */
- X187c195
- X< for (i = 0, k = 0; i < iter; i++) {
- X---
- X> for (i = 0, k = 0; i < iter; i++, k++) {
- X189,190d196
- X< j = tab[index[k]];
- X< k++;
- X191a198
- X> j = tab[index[k]];
- X193c200,201
- X< j = tab[i % mask];
- X---
- X> if (k >= mask) k = 0;
- X> j = tab[k];
- X197a206
- X> access[0] = access[0]*1000/HZ; /* convert to millisec */
- X223,224c232,233
- X< fprintf(stderr, "%d %d %.3f\n", iter, access[0] - ohead[0],
- X< ((float)(access[1] - ohead[1]))/60.);
- X---
- X> fprintf(stderr, "%ld %ld %.3f\n", iter, access[0] - ohead[0],
- X> ((float)(access[1] - ohead[1]))/60);
- X227,230c236,239
- X< printf("total real: %d msec cpu: %.1f sec\n", access[0], ((float)access[1])/60.);
- X< printf("access real: %d msec cpu: %.1f sec\n", access[0] - ohead[0],
- X< ((float)(access[1] - ohead[1]))/60.);
- X< printf("%d Kbyte array: %.1f accesses per second\n", size*sizeof(int)/1024,
- X---
- X> printf("total real: %ld msec cpu: %.1f sec\n", access[0], ((float)access[1])/60);
- X> printf("access real: %ld msec cpu: %.1f sec\n", access[0] - ohead[0],
- X> ((float)(access[1] - ohead[1]))/60);
- X> printf("%ld Kbyte array: %.1f accesses per second\n", size*sizeof(int)/1024L,
- X232a242
- X> srand(j); /* use value from loop to fool clever optimizers */
- End-of-File-Grunt
- if test 3047 -ne `cat 'update.002' | wc -c`
- then
- echo 'shar: transmission error (expected 3047 characters)'
- fi
- echo 'x - update.003'
- if test -f 'update.003'
- then
- echo 'shar: over-writing existing file update.003'
- fi
- sed 's/^X//' > update.003 <<'End-of-File-Grunt'
- X2c2
- X< * $Header: fstime.c,v 3.4 87/06/22 14:23:05 kjmcdonell Beta $
- X---
- X> * $Header: fstime.c,v 5.2 87/12/09 14:48:05 kenj Exp $
- X9a10
- X> long times();
- X31a33
- X> char *fname;
- X36a39
- X> char *mktemp();
- X62,67c65,77
- X< close(creat("dummy0", 0600));
- X< close(creat("dummy1", 0600));
- X< f = open("dummy0", 2);
- X< g = open("dummy1", 2);
- X< unlink("dummy0");
- X< unlink("dummy1");
- X---
- X> fname = mktemp("fstXXXXXX");
- X> close(creat(fname, 0600));
- X> if ((f = open(fname, 2)) == -1) {
- X> fprintf(stderr, "fstime: open file #1 \"%s\" failed!\n", fname);
- X> exit(1);
- X> }
- X> unlink(fname);
- X> close(creat(fname, 0600));
- X> if ((g = open(fname, 2)) == -1) {
- X> fprintf(stderr, "fstime: open file #2 \"%s\" failed!\n", fname);
- X> exit(1);
- X> }
- X> unlink(fname);
- X89c99
- X< if (write(f, buf, sizeof(buf)) <= 0)
- X---
- X> if (write(f, buf, sizeof(buf)) != sizeof(buf)) {
- X90a101,102
- X> exit(1);
- X> }
- X138c150
- X< if (read(f, buf, sizeof(buf)) <= 0)
- X---
- X> if (read(f, buf, sizeof(buf)) != sizeof(buf)) {
- X139a152,153
- X> exit(1);
- X> }
- X187,190c201,208
- X< if (read(f, buf, sizeof(buf)) <= 0)
- X< perror("fstime: read in copy");
- X< if (write(g, buf, sizeof(buf)) <= 0)
- X< perror("fstime: write in copy");
- X---
- X> if (read(f, buf, sizeof(buf)) != sizeof(buf)) {
- X> perror("fstime: copy-read");
- X> exit(1);
- X> }
- X> if (write(g, buf, sizeof(buf)) != sizeof(buf)) {
- X> perror("fstime: copy-write");
- X> exit(1);
- X> }
- End-of-File-Grunt
- if test 1465 -ne `cat 'update.003' | wc -c`
- then
- echo 'shar: transmission error (expected 1465 characters)'
- fi
- echo 'x - update.004'
- if test -f 'update.004'
- then
- echo 'shar: over-writing existing file update.004'
- fi
- sed 's/^X//' > update.004 <<'End-of-File-Grunt'
- X4c4
- X< * $Header: pipe.c,v 3.5 87/06/22 14:32:36 kjmcdonell Beta $
- X---
- X> * $Header: pipe.c,v 5.2 87/12/09 15:35:32 kenj Exp $
- X14a15,16
- X> if (argc > 1)
- X> iter = atoi(argv[1]);
- End-of-File-Grunt
- if test 181 -ne `cat 'update.004' | wc -c`
- then
- echo 'shar: transmission error (expected 181 characters)'
- fi
- echo 'x - update.005'
- if test -f 'update.005'
- then
- echo 'shar: over-writing existing file update.005'
- fi
- sed 's/^X//' > update.005 <<'End-of-File-Grunt'
- X16c16
- X< * $Header: makework.c,v 3.9 87/09/17 05:55:13 kenj Exp $
- X---
- X> * $Header: makework.c,v 5.2 87/12/09 15:06:17 kenj Exp $
- X59a60
- X> FILE *uf; /* user ordinal number file */
- X61,63c62
- X< #ifndef DEBUG
- X< freopen("Tmp/masterlog.00", "a", stderr);
- X< #endif
- X---
- X> freopen("Tmp/masterlog.00", "w", stderr);
- X105,106c104,105
- X< /* clone copies of myself to run up to MAXSTREAM jobs each */
- X< firstuser = MAXSTREAM;
- X---
- X> /* clone copies of myself to run up to MAXSTREAM users each */
- X> firstuser = 0;
- X109a109
- X> cmseq++;
- X111,116c111,113
- X< if (nusers >= 2*MAXSTREAM)
- X< /* the next clone must run MAXSTREAM jobs */
- X< nstream = MAXSTREAM;
- X< else
- X< /* the next clone must run the leftover jobs */
- X< nstream = nusers - MAXSTREAM;
- X---
- X> sprintf(logname, "Tmp/masterlog.%02d", cmseq);
- X> freopen(logname, "w", stderr);
- X> nstream = MAXSTREAM;
- X122c119
- X< cmseq = firstuser/MAXSTREAM;
- X---
- X> fflush(stderr);
- X124a122
- X> freopen("Tmp/masterlog.00", "a", stderr);
- X127a126,127
- X> /* I am the master with nstream fewer users to run */
- X> freopen("Tmp/masterlog.00", "a", stderr);
- X129d128
- X< /* I am the master with nstream fewer jobs to run */
- X131c130
- X< firstuser += MAXSTREAM;
- X---
- X> firstuser += nstream;
- X134c133
- X< /* I am a clone, run MAXSTREAM jobs */
- X---
- X> /* I am a clone, run nstream users */
- X137,140d135
- X< #ifndef DEBUG
- X< sprintf(logname, "Tmp/masterlog.%02d", cmseq);
- X< freopen(logname, "w", stderr);
- X< #endif
- X145d139
- X< firstuser = 0;
- X175d168
- X< #ifndef DEBUG
- X178d170
- X< #endif
- X196,198c188,190
- X< sprintf(logname, "USER.%02d", firstuser+i);
- X< if (close(creat(logname, 0600)) == -1) {
- X< fprintf(stderr, "makework: creat \"%s\" failed!\n", logname);
- X---
- X> if ((uf = fopen("USER", "w")) == NULL) {
- X> fprintf(stderr, "makework: creat \"USER\" failed for user %d!\n",
- X> firstuser+i);
- X201a194,195
- X> fprintf(uf, "%d\n", firstuser+i);
- X> fclose(uf);
- X313c307
- X< * 5 minutes should be ample, since the time to run all jobs is of
- X---
- X> * 5 minutes should be ample, since the time to run all users is of
- X315c309
- X< * so the timeout has been set at 20 minutes (1200 seconds).
- X---
- X> * so the timeout has been set at 30 minutes (1800 seconds).
- X318c312
- X< alarm(1200);
- X---
- X> alarm(1800);
- X336c330
- X< fprintf(stderr, "clone %d done, pid %d ", cmseq, c);
- X---
- X> fprintf(stderr, "clone done, pid %d ", c);
- X364c358
- X< wrapup("Timed out waiting for jobs to finish ...");
- X---
- X> wrapup("Timed out waiting for users to finish ...");
- End-of-File-Grunt
- if test 2554 -ne `cat 'update.005' | wc -c`
- then
- echo 'shar: transmission error (expected 2554 characters)'
- fi
- echo 'x - update.006'
- if test -f 'update.006'
- then
- echo 'shar: over-writing existing file update.006'
- fi
- sed 's/^X//' > update.006 <<'End-of-File-Grunt'
- X3c3
- X< static char RCSid[] = "$Header: util.c,v 1.3 87/06/23 15:56:41 kjmcdonell Beta $";
- X---
- X> static char RCSid[] = "$Header: util.c,v 5.2 87/12/09 16:58:23 kenj Exp $";
- X24a25,26
- X> extern int firstuser;
- X>
- X31,32c33,34
- X< fprintf(stderr, "job %d: cmd: %s home: %s tty: %s\n",
- X< i, work[i].cmd, work[i].home, work[i].tty);
- X---
- X> fprintf(stderr, "user %d: cmd: %s home: %s tty: %s\n",
- X> firstuser+i, work[i].cmd, work[i].home, work[i].tty);
- End-of-File-Grunt
- if test 444 -ne `cat 'update.006' | wc -c`
- then
- echo 'shar: transmission error (expected 444 characters)'
- fi
- echo 'x - update.007'
- if test -f 'update.007'
- then
- echo 'shar: over-writing existing file update.007'
- fi
- sed 's/^X//' > update.007 <<'End-of-File-Grunt'
- X3c3
- X< static char RCSid[] = "$Header: getwork.c,v 1.3 87/06/23 17:01:47 kjmcdonell Beta $";
- X---
- X> static char RCSid[] = "$Header: getwork.c,v 5.2 87/12/09 14:51:26 kenj Exp $";
- X8c8
- X< * of job streams.
- X---
- X> * of users.
- X46c46
- X< fprintf(stderr, "Insufficient job streams in the workload file\n");
- X---
- X> fprintf(stderr, "Insufficient user work specifications in the workload file\n");
- X63,64d62
- X< if (w->home != (char *)0)
- X< free(w->home);
- X118c116
- X< /* standard output for this job */
- X---
- X> /* standard output for this user */
- X124,125d121
- X< if (w->tty != (char *)0)
- X< free(w->tty);
- X132c128
- X< /* standard input for this job */
- X---
- X> /* standard input for this user */
- End-of-File-Grunt
- if test 697 -ne `cat 'update.007' | wc -c`
- then
- echo 'shar: transmission error (expected 697 characters)'
- fi
- echo 'x - update.008'
- if test -f 'update.008'
- then
- echo 'shar: over-writing existing file update.008'
- fi
- sed 's/^X//' > update.008 <<'End-of-File-Grunt'
- X7,8c7,8
- X< * of "rate" characters per second, and copied to "copyfile" if
- X< * specified
- X---
- X> * of "rate" characters per second, and optinally echoed to another
- X> * file/device.
- X13c13
- X< * $Header: keyb.c,v 3.5 87/06/22 14:24:28 kjmcdonell Beta $
- X---
- X> * $Header: keyb.c,v 5.2 87/12/09 15:01:18 kenj Exp $
- X23c23
- X< int est_rate = DEF_RATE;
- X---
- X> float est_rate = DEF_RATE;
- X56c56,59
- X< if ((p = getenv("tty")) != (char *)0) {
- X---
- X> /*
- X> * No echoing if env var either undefined or a null string.
- X> */
- X> if ((p = getenv("tty")) != (char *)0 && *p != '\0') {
- X87c90,94
- X< if (nch == 0)
- X---
- X> if (nch < 0) {
- X> perror("keyb: ** read error **");
- X> exit(4);
- X> }
- X> else if (nch == 0)
- X90a98
- X> buf[nch] = '\0';
- X92c100
- X< fprintf(stderr, "type: ** SIGPIPE error ** buf: %s\n", buf);
- X---
- X> fprintf(stderr, "keyb: ** SIGPIPE error ** buf: %s\n", buf);
- X94c102,103
- X< fprintf(stderr, "type: ** write error ** buf: %s\n", buf);
- X---
- X> fprintf(stderr, "keyb: ** write error ** wrote %d of %d from buf: \"%s\"\n", written, nch, buf);
- X> perror("keyb is dying...");
- End-of-File-Grunt
- if test 1103 -ne `cat 'update.008' | wc -c`
- then
- echo 'shar: transmission error (expected 1103 characters)'
- fi
- echo 'x - update.009'
- if test -f 'update.009'
- then
- echo 'shar: over-writing existing file update.009'
- fi
- sed 's/^X//' > update.009 <<'End-of-File-Grunt'
- X4c4
- X< * $Header: clock.c,v 3.4 87/06/22 14:22:54 kjmcdonell Beta $
- X---
- X> * $Header: clock.c,v 5.2 87/12/09 14:42:34 kenj Exp $
- X18a19
- X> long times();
- End-of-File-Grunt
- if test 153 -ne `cat 'update.009' | wc -c`
- then
- echo 'shar: transmission error (expected 153 characters)'
- fi
- echo 'x - update.010'
- if test -f 'update.010'
- then
- echo 'shar: over-writing existing file update.010'
- fi
- sed 's/^X//' > update.010 <<'End-of-File-Grunt'
- X5c5
- X< * $Header: ttychk.c,v 3.6 87/06/22 14:32:58 kjmcdonell Beta $
- X---
- X> * $Header: ttychk.c,v 5.2 87/12/09 16:57:02 kenj Exp $
- X31c31
- X< int nscript; /* number of script files */
- X---
- X> int need; /* max ttys that could be used */
- X35c35
- X< int nttys; /* number of active ttys */
- X---
- X> int nttys = 0; /* number of required ttys */
- X42,43c42,43
- X< if (argc < 5) {
- X< fprintf(stderr, "Usage: ttychk nusers orate nscript ttydev ... \n");
- X---
- X> if (argc < 4) {
- X> fprintf(stderr, "Usage: ttychk nusers orate ttydev ... \n");
- X52,56d51
- X< nscript = atoi(argv[3]);
- X< if (nscript < 1) {
- X< fprintf(stderr, "ttychk: nscript must be > 0\n");
- X< status |= 1;
- X< }
- X58c53
- X< nttys = nusers <= nscript ? nusers : nscript;
- X---
- X> need = nusers;
- X61c56
- X< for (i = 4; i < argc && nttys; i++, nttys--) {
- X---
- X> for (i = 3; i < argc && need; i++, nttys++, need--) {
- X95d89
- X< nttys = nusers <= nscript ? nusers : nscript;
- End-of-File-Grunt
- if test 915 -ne `cat 'update.010' | wc -c`
- then
- echo 'shar: transmission error (expected 915 characters)'
- fi
- echo 'x - update.011'
- if test -f 'update.011'
- then
- echo 'shar: over-writing existing file update.011'
- fi
- sed 's/^X//' > update.011 <<'End-of-File-Grunt'
- X#! /bin/sh
- X# $Header: MAKE,v 5.2 87/12/14 10:53:32 kenj Exp $
- X# Compensation for the inadequacies of make.
- X
- Xfor dir in Work* Tools
- Xdo
- X test -d $dir || continue
- X echo ${dir}:
- X cd $dir
- X test -f Makefile || co Makefile
- X make $1
- X cd ..
- Xdone
- End-of-File-Grunt
- if test 244 -ne `cat 'update.011' | wc -c`
- then
- echo 'shar: transmission error (expected 244 characters)'
- fi
- echo 'x - update.012'
- if test -f 'update.012'
- then
- echo 'shar: over-writing existing file update.012'
- fi
- sed 's/^X//' > update.012 <<'End-of-File-Grunt'
- X#! /bin/sh
- X# Package things up ready for a distribution
- X# $Header: mkdistrib,v 5.2 87/12/09 15:10:22 kenj Exp $
- X
- Xmake purge >/dev/null
- X
- Xfor dir in *
- Xdo
- X test -d $dir -a $dir != "RCS" -a $dir != "Tmp" || continue
- X echo ${dir}:
- X cd $dir
- X if test "`echo *`" != '*'
- X then
- X if test -f Makefile
- X then
- X make purge >/dev/null
- X fi
- X args=""
- X for file in *
- X do
- X test -d $file && continue
- X if test -f "../$file"
- X then
- X ver=1
- X while test -f ../$file,$ver
- X do
- X ver=`expr $ver + 1`
- X done
- X mv $file $file,$ver
- X args="$args $file,$ver"
- X else
- X args="$args $file"
- X fi
- X done
- X if test "$args" != ""
- X then
- X ls $args >../$dir.mf
- X mv $args ..
- X fi
- X fi
- X cd ..
- Xdone
- X
- Xrm -rf Tmp
- End-of-File-Grunt
- if test 702 -ne `cat 'update.012' | wc -c`
- then
- echo 'shar: transmission error (expected 702 characters)'
- fi
- echo 'x - update.013'
- if test -f 'update.013'
- then
- echo 'shar: over-writing existing file update.013'
- fi
- sed 's/^X//' > update.013 <<'End-of-File-Grunt'
- X3,4c3,4
- X< # $Header: mkinstall,v 1.3 87/09/10 05:08:45 kenj Exp $
- X< for list in *.files
- X---
- X> # $Header: mkinstall,v 5.2 87/12/09 15:11:56 kenj Exp $
- X> for list in *.mf
- X6c6
- X< if test "$list" = '*.files'
- X---
- X> if test "$list" = '*.mf'
- X10c10
- X< dir=`echo $list | sed 's/.files//'`
- X---
- X> dir=`echo $list | sed 's/.mf//'`
- End-of-File-Grunt
- if test 333 -ne `cat 'update.013' | wc -c`
- then
- echo 'shar: transmission error (expected 333 characters)'
- fi
- echo 'x - update.014'
- if test -f 'update.014'
- then
- echo 'shar: over-writing existing file update.014'
- fi
- sed 's/^X//' > update.014 <<'End-of-File-Grunt'
- X2c2
- X< # $Header: mkscript,v 1.2 87/06/22 14:35:54 kjmcdonell Beta $
- X---
- X> # $Header: mkscript,v 5.2 87/12/09 15:21:41 kenj Exp $
- X4a5
- X> # **assumption** run from a Workload directory -- so ../mkperm is sensible!
- X11a13
- X> tmp=/tmp/$$
- X27,28c29,30
- X< awk '
- X< BEGIN { '"`./mkperm -s $k $ns | sed 's/[0-9][0-9]*/perm[i++] = &;/g`"' nj=0 }
- X---
- X> awk '
- X> BEGIN { '"`../mkperm -s $k $ns | sed 's/[0-9][0-9]*/perm[i++] = &;/g`"' nj=0 }
- X30a33
- X> /^%/ { next }
- X36c39
- X< END { print job[0]
- X---
- X> END { if (job[0] != "") print job[0]
- X39,41c42,84
- X< print job[nj]
- X< }' $1 > script.$k
- X< k=`expr $k + 1`
- X---
- X> if (job[nj] != "") print job[nj]
- X> print "End-of-Script"
- X> }' $1 \
- X> | awk '
- X> { print }
- X> /^\.\/keyb / { print "%include",$2 }
- X> /^keyb / { print "%include",$2 }' >${tmp}a
- X>
- X> echo "BEGIN {" >${tmp}b
- X> grep '%include' ${tmp}a \
- X> | sed 's/%include //' \
- X> | while read file
- X> do
- X> echo " fill[\"$file\"]=`cat $file | wc -c`" >>${tmp}b
- X> done
- X>
- X> cat >>${tmp}b <<'End-of-File'
- X> }
- X> /^%include/ { nch=fill[$2]
- X> need=1
- X> next
- X> }
- X> need==1 && fg==1{ f=0
- X> while (f+70 <= nch) {
- X> printf ": +%05d+ FILLER Mary had a little lamb, its fleece was white as snow\n",f
- X> f += 70
- X> }
- X> printf ": +%05d+ ",nch
- X> f += 11
- X> while (f++ < nch)
- X> printf "x"
- X> print ""
- X> need=0
- X> }
- X> /^End-of-Script$/ { exit }
- X> { fg=1 }
- X> /&$/ { fg=0 }
- X> { print }
- X> End-of-File
- X>
- X> rm -f script.$k
- X> awk -f ${tmp}b ${tmp}a > script.$k
- X> k=`expr $k + 1`
- X42a86,89
- X>
- X> rm -f ${tmp}*
- X>
- X> exit 0
- End-of-File-Grunt
- if test 1587 -ne `cat 'update.014' | wc -c`
- then
- echo 'shar: transmission error (expected 1587 characters)'
- fi
- echo 'x - update.015'
- if test -f 'update.015'
- then
- echo 'shar: over-writing existing file update.015'
- fi
- sed 's/^X//' > update.015 <<'End-of-File-Grunt'
- X#! /bin/sh
- X# try running a script a catching the output
- X# $Header: mkscript.out,v 5.2 87/12/09 15:34:15 kenj Exp $
- Xtmp=/tmp/$$
- Xcmdline=`sed 1q script.master | grep '^%W%' | sed 's/%W%[ ]*//'`
- Xif test "$cmdline" = ""
- Xthen
- X echo "mkscript.out: illegal %W% record at beginning of \"script.master\""
- X exit 1
- Xfi
- X
- Xif make clean context
- Xthen
- X :
- Xelse
- X echo "mkscript.out: \"make clean context\" failed!"
- X exit 1
- Xfi
- X
- Xif test ! -f script.1
- Xthen
- X echo "mkscript.out: cannot find \"script.1\""
- X exit 1
- Xfi
- X
- X# skip the control lines
- Xhere=`grep -v '^%' script.master | wc -l | sed 's/ *//'`
- X# skip the filler text associated with keyb usage
- Xthere=`grep -v '^: +[0-9][0-9]*+ ' script.1 | wc -l | sed 's/ *//'`
- Xif test "$here" -ne "$there"
- Xthen
- X echo "mkscript.out: script.master ($here cmds) differs from script.1 ($there cmds)"
- X exit 1
- Xfi
- Xrm -f script.out
- Xcp script.1 script.out
- Xrm -f sterr.bad
- X
- Xrate=500 tty=/dev/null ; export tty rate
- Xmkdir .tmp
- Xif cp `make manifest` .tmp
- Xthen
- X :
- Xelse
- X echo "mkscript.out: \"cp\" failed!"
- X rm -rf script.out .tmp ${tmp}*
- X exit 1
- Xfi
- Xcd .tmp
- Xecho "0" >USER
- Xif $cmdline ../script.1 >>../script.out 2>${tmp}a
- Xthen
- X :
- Xelse
- X cd ..
- X echo "mkscript.out: fatal error ... see \"script.out.bad\""
- X mv script.out script.out.bad
- X cat ${tmp}a >>script.out.bad
- X rm -rf .tmp ${tmp}*
- X exit 1
- Xfi
- X
- Xcd ..
- Xif test -f cleanstderr
- Xthen
- X ( cat ${tmp}a ; echo "" ) | ./cleanstderr >${tmp}b
- Xelse
- X cp ${tmp}a ${tmp}b
- Xfi
- Xif test -s ${tmp}b
- Xthen
- X echo "mkscript.out: unexpected std error output ..."
- X sed 's/^/ /' ${tmp}b
- X mv ${tmp}a stderr.bad
- X rm -rf script.out .tmp ${tmp}*
- X exit 1
- Xfi
- X
- Xrm -rf .tmp ${tmp}*
- End-of-File-Grunt
- if test 1685 -ne `cat 'update.015' | wc -c`
- then
- echo 'shar: transmission error (expected 1685 characters)'
- fi
- echo 'x - update.016'
- if test -f 'update.016'
- then
- echo 'shar: over-writing existing file update.016'
- fi
- sed 's/^X//' > update.016 <<'End-of-File-Grunt'
- X#! /bin/sh
- X# Replace XXX by parent dir and current dir [ -w specified ] into $PATH
- X# for scripts.
- X# Used from Work* dirs.
- X# $Header: fixPATH,v 5.2 87/12/09 14:43:08 kenj Exp $
- X
- Xtmp=/tmp/$$
- Xdir=`cd ..;pwd`
- Xtest $# -eq 1 -a "X$1X" = "X-wX" && dir="$dir:"`pwd`
- X
- Xfor s in script.[0-9]*
- Xdo
- X sed -e s,PATH=XXX,PATH=$dir, $s >$tmp
- X rm -f $s
- X mv $tmp $s
- Xdone
- X
- Xrm -f $tmp
- End-of-File-Grunt
- if test 372 -ne `cat 'update.016' | wc -c`
- then
- echo 'shar: transmission error (expected 372 characters)'
- fi
- echo 'x - update.017'
- if test -f 'update.017'
- then
- echo 'shar: over-writing existing file update.017'
- fi
- sed 's/^X//' > update.017 <<'End-of-File-Grunt'
- X#! /bin/sh
- X#
- X# Produce histograms and marks statistics
- X#
- X# $Header: qhisto,v 5.3 88/01/19 07:31:35 kenj Exp $
- Xif test $# -gt 0 -a X$1X = X-dX
- Xthen
- X debug=1
- X shift
- Xfi
- X
- Xif test $# -eq 0
- Xthen
- X cat > /tmp/qh$$
- X trap "rm -f /tmp/qh$$ ; exit" 0 1 2 3 15
- X file=/tmp/qh$$
- Xelif test $# -eq 1
- Xthen
- X file=$1
- Xelse
- X echo "Usage: qhisto [ file ]"
- X exit 1
- Xfi
- X
- Xmaxq=`awk "NR==1 {print NF; exit}" <$file`
- Xif test "$maxq" = 0
- Xthen
- X maxq=1
- Xfi
- Xq=1
- Xwhile test "$q" -le "$maxq"
- Xdo
- Xawk < $file '
- XBEGIN { q='$q'; debug='${debug-0}' }
- XNR == 1 { min=$q }
- Xq == 0 {
- X x=0; summary=1
- X for (i=1; i<=NF; i++)
- X if ($i != "-") x += $i
- X dat[x]++; sum += x; count++
- X if (x > max) max=x
- X if (x < min) min=x
- X next
- X }
- X$q != "-" {
- X dat[$q]++; sum += $q; count++
- X if ($q > max) max=$q
- X if ($q < min) min=$q
- X }
- X$q ~ /[^0-9 -\.]/ { alpha=1 }
- XEND {
- X print; print; print
- X if (summary != 1) {
- X printf "Question %d)",q
- X printf " Answers: %d",count
- X } else
- X printf "Total Across All Questions Students: %d", count
- X if (count > 0) printf " Mean Mark: %.2f",sum/count
- X if (alpha) {
- X min=0 ; max=0
- X for (i in dat) max++
- X }
- X if (debug) {
- X printf "\nmax=%s min=%s\n",max,min
- X for (i in dat) printf "dat[%s]=%d ",i,dat[i]
- X }
- X print; print
- X hscale=1
- X if (!alpha) {
- X width=70
- X ok=0
- X while (!ok) {
- X hscale=(1+max-min)/width
- X if (hscale < 1) {
- X j=1
- X f=1
- X while (f>hscale) {
- X f /= 10
- X j *= 10
- X }
- X hscale *= j
- X if (hscale >= 4)
- X hscale=4
- X else if (hscale >= 2)
- X hscale=2
- X else
- X hscale=1
- X hscale /= j
- X }
- X else if (hscale > 1) {
- X hscale=int(hscale)
- X d=length(hscale)-1
- X j=1
- X while (d) {
- X j *= 10
- X d--
- X }
- X hscale /= j
- X if (hscale >= 5)
- X hscale=5
- X else if (hscale >= 2.5)
- X hscale=2.5
- X else
- X hscale=1
- X hscale *= j
- X }
- X min=int(min/(5*hscale))*5*hscale
- X if (max/hscale != int(max/hscale))
- X max=(int(max/hscale)+1)*hscale
- X if (debug) printf "max=%s min=%s\n",max,min
- X if (1+(max-min)/hscale > 70)
- X width -= 10
- X else
- X ok=1
- X if (debug) print "hscale=" hscale " width=" width
- X }
- X if (debug) print "hscale=" hscale
- X if (hscale != 1) {
- X k=0
- X max += hscale*2
- X for (i=min; i<=max; i += hscale) {
- X cnt=0
- X for (d in dat) {
- X if (0+i <= 0+d && 0+d < i+hscale) {
- X cnt += dat[d]
- X if (debug) print i,"<= data",d,"<",i+hscale,", cum freq=",cnt
- X }
- X }
- X if (cnt > 0)
- X hist[k]=cnt
- X k++
- X }
- X max=k-1
- X }
- X else {
- X for (i in dat) hist[i-min]=dat[i]
- X max=max-min
- X }
- X if (debug) printf "max=%s min=%s hscale=%s\n",max,min,hscale
- X }
- X else
- X for (i in dat) hist[i]=dat[i]
- X if (debug) for (i in hist) printf "hist[%s]=%d ",i,hist[i] ; print ""
- X fill=int((70-(max+1-min))/(max+1-min))
- X if (fill > 4) fill=4
- X else if (fill < 0) fill=0
- X if (debug) print "fill=" fill
- X pad=""; dash=""
- X for (k=fill; k>0; k--) {
- X pad=pad " "
- X dash=dash "-"
- X }
- X skip=1
- X if (fill == 2) skip=2
- X else if (fill == 1 || fill == 0) skip=5
- X for (i in hist) if (hist[i] > maxfreq) maxfreq=hist[i]
- X vscale=int((maxfreq+19)/20)
- X if (vscale < 1) vscale=1
- X jmax=int((maxfreq+vscale-1)/vscale)*vscale
- X j=jmax
- X while (j > 0) {
- X if (j == jmax || j % (vscale*5) == 0) printf "%3d + ",j
- X else printf " + "
- X if (j % (vscale*5) == 0) {
- X s1=dash
- X s2=dash "-"
- X }
- X else {
- X s1=pad
- X s2=pad " "
- X }
- X thres=j-vscale/2
- X if (!alpha) {
- X for (i=0; i<=max; i++) {
- X if (hist[i] >= thres) printf "%s*",s1
- X else printf s2
- X }
- X }
- X else {
- X for (i in hist) {
- X if (hist[i] >= thres) printf "%s*",s1
- X else printf s2
- X }
- X }
- X print; j -= vscale
- X }
- X printf " "
- X if (alpha)
- X for (i in hist) printf "%s+",dash
- X else {
- X for (i=0; i<=max; i++) {
- X if (i % skip == 0) printf "%s+",dash
- X else printf "%s-",dash
- X }
- X }
- X print
- X if (alpha) {
- X p=1; more=1
- X while (more) {
- X more=0; printf " "
- X for (i in hist) {
- X if (length(i)>=p) {
- X c=substr(i, p, 1)
- X printf "%s%s",pad,c
- X if (length(i)>=p+1) more++
- X }
- X else printf "%s ",pad
- X }
- X print; p++
- X }
- X }
- X else {
- X d = int(min+max*hscale)
- X if (d >= 10) {
- X p = log(d)/log(10)
- X if (p != int(p)) p = 1+int(p)
- X }
- X else
- X p = 1
- X j=1
- X while (p) {
- X j *= 10
- X p--
- X }
- X for (; j>=1; j=int(j/10)) {
- X if (min+max*hscale < j && j > 1) continue
- X printf " "
- X val=min
- X for (i=0; i<=max; i++) {
- X if ((i%skip == 0) && (val+0.001>=j || j==1)) printf "%s%d",pad,(0.001+(val/j))%10
- X else printf "%s ",pad
- X val += hscale
- X }
- X print ""
- X }
- X if (hscale < 1) {
- X printf " "
- X val=min
- X for (i=0; i<=max; i++) {
- X if (i%skip == 0) printf "%s.",pad
- X else printf "%s ",pad
- X val += hscale
- X }
- X print ""
- X p = -log(hscale)/log(10)
- X if (p != int(p)) p = int(p)
- X j=1
- X while (p) {
- X printf " "
- X val=min*j
- X for (i=0; i<=max; i++) {
- X val -= int(val)
- X d = int(10*val+0.001)
- X if (d == 10) d = 0
- X if (i%skip == 0) {
- X printf "%s%d",pad,d
- X }
- X else printf "%s ",pad
- X val += hscale*j
- X }
- X print ""
- X j *= 10
- X p--
- X }
- X }
- X }
- X }
- X'
- Xif test "$q" -eq 0
- Xthen
- X exit
- Xfi
- Xif test "$q" -eq "$maxq" -a "$maxq" -gt 1
- Xthen
- X q=0
- Xelse
- X q=`expr $q + 1`
- Xfi
- Xdone
- End-of-File-Grunt
- if test 5254 -ne `cat 'update.017' | wc -c`
- then
- echo 'shar: transmission error (expected 5254 characters)'
- fi
- echo 'x - update.018'
- if test -f 'update.018'
- then
- echo 'shar: over-writing existing file update.018'
- fi
- sed 's/^X//' > update.018 <<'End-of-File-Grunt'
- X#! /bin/sh
- X# $Header: Groan,v 5.2 87/12/09 08:58:36 kenj Exp $
- X# run MUSBUS multiuser test continuously
- Xlog=Tmp/log.groan
- Xnogroan=Tmp/nogroan
- Xnospeed=Tmp/nospeed
- Xnusers=${nusers-"8 16"}
- Xttys=${ttys-"/dev/ttyi05 /dev/ttyi17 /dev/ttyi36 /dev/ttyi53"}
- Xdirs=${dirs-"`echo /*/musbus`"}
- Xiterations=${iterations-4}
- Xrate=${rate-4}
- Xexport nusers ttys dirs iterations rate workdir
- X
- Xrm -f $nogroan
- Xn=1
- X
- Xfor t in $ttys
- Xdo
- X stty 9600 -tabs -raw -nl >$t &
- Xdone
- Xfor d in $dirs
- Xdo
- X if test -d $d
- X then
- X :
- X else
- X mkdir $d
- X echo $d created.
- X fi
- Xdone
- X
- Xdate > $log
- X
- Xwhile test ! -f $nogroan
- Xdo
- X for workdir in Work_stress Work_text Workload
- X do
- X echo $workdir: >>$log
- X if test $n -eq 1 -a ! -f $nospeed
- X then
- X ./run >> $log 2>&1
- X else
- X ./run work >> $log 2>&1
- X fi
- X done
- X echo "Groan: Major Iteration $n Completed" >>$log
- X n=`expr $n + 1`
- Xdone
- X
- Xexit 0
- End-of-File-Grunt
- if test 857 -ne `cat 'update.018' | wc -c`
- then
- echo 'shar: transmission error (expected 857 characters)'
- fi
- echo 'x - update.019'
- if test -f 'update.019'
- then
- echo 'shar: over-writing existing file update.019'
- fi
- sed 's/^X//' > update.019 <<'End-of-File-Grunt'
- X#! /bin/sh
- X# Plot progress of the multi-user workload.
- X# $Header: progress,v 5.2 87/12/09 15:36:43 kenj Exp $
- Xif test ! -r Tmp/script.1
- Xthen
- X echo "progress: cannot read \"Tmp/script.1\""
- X exit 1
- Xfi
- X
- Xif test `echo Tmp/userlog.* | sed 's/ .*//'` = "Tmp/userlog.*"
- Xthen
- X echo "progress: no active log files"
- X exit 1
- Xfi
- X
- Xecho 'MUSBUS Multi-user Test: -- Progress Report --
- XOne * per simulated user, representing the number of commands completed;
- Xexcept the right most * which is the total number of commands per script.'
- X
- XPS1=`/bin/sh -ic "" 2>&1`
- X( ( cat Tmp/script.1 | wc -l ) \
- X; for i in Tmp/userlog.*
- Xdo
- X if test ! -r "$i"
- X then
- X echo "progress: cannot read \"$i\""
- X exit 1
- X fi
- X ( cat $i ; echo "" ) \
- X | sed 's/ /\
- X/g' \
- X | sort \
- X | uniq -c \
- X | sort -nr -1 \
- X | sed -e 's/ *\([0-9][0-9]*\) .*/\1/' -e 1q
- Xdone ) \
- X| ./qhisto \
- X| sed \
- X -e '1,/Question/d
- End-of-File-Grunt
- if test 900 -ne `cat 'update.019' | wc -c`
- then
- echo 'shar: transmission error (expected 900 characters)'
- fi
- echo 'x - update.020'
- if test -f 'update.020'
- then
- echo 'shar: over-writing existing file update.020'
- fi
- sed 's/^X//' > update.020 <<'End-of-File-Grunt'
- X1c1,2
- X< # $Header: SysVtime.awk,v 3.4 87/06/22 14:27:23 kjmcdonell Beta $
- X---
- X> # $Header: SysVtime.awk,v 5.2 87/12/09 09:27:11 kenj Exp $
- X> /^cctest.c$/ { next }
- End-of-File-Grunt
- if test 163 -ne `cat 'update.020' | wc -c`
- then
- echo 'shar: transmission error (expected 163 characters)'
- fi
-